  //获取元素
  var input1 = $(".input1");
  var input2 = $(".input2");
  var input3 = $(".input3");
  var select = $(".select");
  var button = $(".button");

  button.click(() => {
    var value1 = Number(input1.val());
    var value2 = Number(input2.val());
    var value3 = 0;
    var option = select.find("option:selected").val();
    // console.log(typeof option)
    switch (option) {
      case "+":
        value3 = value1 + value2;
        break;
      case "-":
        value3 = value1 - value2;
        break;
      case "*":
        value3 = value1 * value2;
        break;
      case "/":
        value3 = value1 / value2;
        break;
    }
    // console.log("结果是" + value3);
    input3.attr("value", value3);
  });